package com.warmheart.builder.platform;

import com.warmheart.core.rs.base.BaseRsBuilder;
import com.warmheart.core.rs.oper.Rs;
import com.warmheart.entity.platform.PlatformResource;

/**
 * 
 * @ClassName: PlatformResource
 * @Description: 平台下的具体服务器或数据库资源实体RsBuilder类，对应表名称为tb_platform_resource
 *               温馨提示：不要修改该实体RsBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午15:25:00
 *
 */
public class PlatformResourceRsBuilder extends BaseRsBuilder<PlatformResource, PlatformResourceRsBuilder> {

    private final PlatformResource t;

    @Override
    protected PlatformResourceRsBuilder self() {
        return this;
    }

    @Override
    public PlatformResource core() {
        return this.t;
    }

    public PlatformResourceRsBuilder(PlatformResource platformResource) {
        t = platformResource;
    }

    /**
     * 所属平台
     */
    private Rs<PlatformResource, PlatformResourceRsBuilder> platformId;

    /**
     * 资源ID
     */
    private Rs<PlatformResource, PlatformResourceRsBuilder> resourceId;

    /**
     * 资源名称，如 web01、db~prod
     */
    private Rs<PlatformResource, PlatformResourceRsBuilder> name;

    /**
     * 主机地址，如IP/域名
     */
    private Rs<PlatformResource, PlatformResourceRsBuilder> host;

    /**
     * 平台绑定的资源描述
     */
    private Rs<PlatformResource, PlatformResourceRsBuilder> description;

    public Rs<PlatformResource, PlatformResourceRsBuilder> platformId() {
        if (this.platformId == null) {
            this.platformId = new Rs<PlatformResource, PlatformResourceRsBuilder>(self(), "platform_id", "platformId");
        }
        return this.platformId;
    }

    public Rs<PlatformResource, PlatformResourceRsBuilder> resourceId() {
        if (this.resourceId == null) {
            this.resourceId = new Rs<PlatformResource, PlatformResourceRsBuilder>(self(), "resource_id", "resourceId");
        }
        return this.resourceId;
    }

    public Rs<PlatformResource, PlatformResourceRsBuilder> name() {
        if (this.name == null) {
            this.name = new Rs<PlatformResource, PlatformResourceRsBuilder>(self(), "name", "name");
        }
        return this.name;
    }

    public Rs<PlatformResource, PlatformResourceRsBuilder> host() {
        if (this.host == null) {
            this.host = new Rs<PlatformResource, PlatformResourceRsBuilder>(self(), "host", "host");
        }
        return this.host;
    }

    public Rs<PlatformResource, PlatformResourceRsBuilder> description() {
        if (this.description == null) {
            this.description = new Rs<PlatformResource, PlatformResourceRsBuilder>(self(), "description", "description");
        }
        return this.description;
    }
}